
#include "drv_cfg.h"

#ifndef _USE_UART_CONFIG_H_
#define _USE_UART_CONFIG_H_

#define UART_TX_BUFFER_SIZE 8
#define UART_RX_BUFFER_SIZE 16

#ifndef UART_CLOCK_FREQ
#define UART_CLOCK_FREQ      _XTAL_FREQ
#endif
#define UART_BAUDRATE 9600

#define BRGH_VAL 0

#define SPBRG_V1  (UART_CLOCK_FREQ / UART_BAUDRATE)
#define SPBRG_V2  SPBRG_V1/64
#define SPBRG_VAL  (SPBRG_V2 - 1)
# if (SPBRG_VAL > 255)
  #error Calculated SPBRG value is out of range
#elif (SPBRG_VAL < 10)
  #error Calculated SPBRG value is out of range
#endif

#endif

